package cn.cupster.motionlayoutshare.example

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.constraintlayout.motion.widget.MotionLayout
import cn.cupster.motionlayoutshare.R

/**
 * motion动画弹幕示例
 */
class DanmakuActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_danmaku)
    }

    var anim: MotionLayout? = null

    override fun onResume() {
        super.onResume()
        anim = findViewById(R.id.motionLayout)
        anim?.postDelayed({
            anim?.performClick()
        }, 300)
    }
}